import { defineStore } from "pinia"
import { ref } from 'vue'
export const useOrderStore = defineStore("order", () => {
    const order = ref({})

    // 添加订单信息
    const addOrder = (order: any) => {
        console.log(order);
        
        order.value = order
    }

    // 删除订单信息
    const deleteOrder = () => {
        order.value = {}
    }
    
    return {
        order,
        addOrder,
        deleteOrder
    }
}, 
{
    persist: true // 开启持久化
})